home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / asg.com / READASG.DOC < prev    next >
Encoding:
Text File  |  1989-07-07  |  10.2 KB  |  273 lines

  1. Documentation for Version 5.0 of ReadASG.TPU
  2.  
  3.   The procedures in this unit allow full screen editing of data entry. Up to
  4. 64 of the twelve AtSayGet (V 5.2) procedures can be joined on one "page" to be
  5. "read" together, and up to 10 pages of ASG procedures can be active at a time.
  6.   The full screen editing commands will be familiar to WordStar/dBase/SideKick
  7. users. In fact, the ReadASG editor is more intuitive than dBase. For example
  8. dBase will just move to the previous field if a ^E or Up Arrow key is pressed,
  9. whereas ReadASG will move to the field above the current one -- even if that
  10. field is not the previous field. In the following diagrams the fields are
  11. numbered in the order that they should be entered on the page (left to right
  12. and top to bottom). This is also the order in which data will be entered if
  13. each field is filled or the ENTER or TAB key is pressed. Pressing the Shift
  14. Tab keys causes the entry screen to back up to the previous field; In the
  15. diagram below Shift Tab would move from 6 to 5, 5 to 4, etc. The effect of
  16. the arrow keys is shown in the following two diagrams:
  17.  
  18.             UP ARROW or ^E                      DOWN ARROW or ^X
  19. ┌───────────────────────────────────┐ ┌───────────────────────────────────┐
  20. │    ┌─^G ─┐ ┌<─<─<─<─<─<─<─<─<┐    │ │                                   │
  21. │    v     ^ v                 ^    │ │                                   │
  22. │  [ field 1 ]         [ field 2 ]  │ │  [ field 1 ]         [ field 2 ]  │
  23. │          ^                   ^    │ │          v                   v    │
  24. │          ^                   ^    │ │          v                   v    │
  25. │          ^           [ field 3 ]  │ │          v           [ field 3 ]  │
  26. │          ^                   ^    │ │          v                   v    │
  27. │          ^                   ^    │ │          v                   v    │
  28. │  [ field 4 ]         [ field 5 ]  │ │  [ field 4 ]         [ field 5 ]  │
  29. │          ^                        │ │  ^       v                   v    │
  30. │          ^                        │ │  └─ ^G <─┘                   v    │
  31. │          └─[ field 6 ]            │ │            [ field 6 ]<─<─<─<┘    │
  32. │                                   │ │                    v              │
  33. │                                   │ │                    v              │
  34. │                                   │ │                 exit              │
  35. └───────────────────────────────────┘ └───────────────────────────────────┘
  36.  
  37.   The ReadASG unit interface follows:
  38.  
  39. {$F+,V-}
  40. UNIT ReadASG;
  41. INTERFACE
  42. USES
  43.  AtSayGet,  {from ASG52.ARC/ZIP}
  44.  CRT;
  45.  
  46. CONST
  47.  BadPage  = -8; { ASGExit code if ASGEntry page is not full }
  48.  FullPage = -9; { ASGExit code if ASGEntry page w/b over-full. See also the
  49.                   ASGExit codes described in the AtSayGet.DOC file. }
  50. TYPE
  51.  MaxFields    = 1..64;  { Number of ASG fields allowed per page. }
  52.  Pages        = 1..10;  { Each "field" on a page consumes 250 bytes of heap
  53.                           space. The page space is released on exit or under
  54.                           program control using the FreeASGHeapPage procedure.
  55.                           If all 10 pages are used, each editing 64 different
  56.                           variables, 160000 bytes of the heap will be used.
  57.                           One page can be re-used to edit many different sets
  58.                           of data -- Multiple pages are only for convenience. }
  59.  
  60.  
  61. {Procedures to create and dispose of HeapPages:}
  62.  
  63. PROCEDURE { Makes a page on the heap to store "Field" information. }
  64. MakeASGHeapPage(PageIndex   : Pages;         {1..10}
  65.                 NumOfFields : MaxFields );   {1..64}
  66.  
  67.  
  68. PROCEDURE { Frees the heap of an un-neaded edit page. }
  69. FreeASGHeapPage(PageIndex : Pages);          {1..10}
  70.  
  71.  
  72.  
  73. {Procedures to add an ASG procedure to a HeapPage:
  74.  
  75. NOTE -- Except for the additional 1st parameter - PageID - all of the following
  76. procedures follow the syntax of the corresponding AtSayGet procedures described
  77. in the AtSayGet.DOC file. The only other deviation is that the address of the
  78. variable being edited (not the variable itself) is the parameter.
  79. }
  80.  
  81. PROCEDURE AddASGB      { Add an AtSayGetBoolean procedure to the page. }
  82. (PageID    : Pages;
  83.  X         : Xrange;
  84.  Y         : Yrange;
  85.  Say       : FieldTxt;
  86.  GetBoolean: POINTER);
  87.  
  88.  
  89. PROCEDURE AddASGCP     { Add an AtSayGetCharPic procedure to the page. }
  90. (PageID    : Pages;
  91.  X         : Xrange;
  92.  Y         : Yrange;
  93.  Say       : FieldTxt;
  94.  GetChar   : POINTER;
  95.  Pic       : CHAR);
  96.  
  97.  
  98. PROCEDURE AddASGSL     { Add an AtSayGetStrLen procedure to the page }
  99. (PageID    : Pages;
  100.  X         : Xrange;
  101.  Y         : Yrange;
  102.  Say       : FieldTxt;
  103.  GetStr    : POINTER;
  104.  Len       : BYTE);
  105.  
  106.  
  107. PROCEDURE AddASGSP     { Add an AtSayGetStrPic procedure }
  108. (PageID    : Pages;
  109.  X         : Xrange;
  110.  Y         : Yrange;
  111.  Say       : FieldTxt;
  112.  GetStr    : POINTER;
  113.  Pic       : FieldTxt);
  114.  
  115.  
  116. PROCEDURE AddASGR      { Add an AtSayGetReal procedure }
  117. (PageID    : Pages;
  118.  X         : Xrange;
  119.  Y         : Yrange;
  120.  Say       : FieldTxt;
  121.  GetReal   : POINTER;
  122.  Len,DecPl : MaxFL);
  123.  
  124.  
  125. PROCEDURE AddASGI      { Add an AtSayGetInt procedure }
  126. (PageID    : Pages;
  127.  X         : Xrange;
  128.  Y         : Yrange;
  129.  Say       : FieldTxt;
  130.  GetInt    : POINTER;
  131.  Len       : MaxFL);
  132.  
  133.  
  134. PROCEDURE AddASGLI     { Add an AtSayGetLongInt procedure }
  135. (PageID    : Pages;
  136.  X         : Xrange;
  137.  Y         : Yrange;
  138.  Say       : FieldTxt;
  139.  GetLongInt: POINTER;
  140.  Len       : MaxFL);
  141.  
  142.  
  143. PROCEDURE AddASGW      { Add an AtSayGetWord procedure }
  144. (PageID    : Pages;
  145.  X         : Xrange;
  146.  Y         : Yrange;
  147.  Say       : FieldTxt;
  148.  GetWord   : POINTER;
  149.  Len       : MaxFL);
  150.  
  151.  
  152. PROCEDURE AddASGRR     { Add an AtSayGetRealRange procedure }
  153. (PageID    : Pages;
  154.  X         : Xrange;
  155.  Y         : Yrange;
  156.  Say       : FieldTxt;
  157.  GetReal   : POINTER;
  158.  Len,DecPl : MaxFL;
  159.  Min,Max   : REAL);
  160.  
  161.  
  162. PROCEDURE AddASGIR     { Add an AtSayGetIntRange procedure }
  163. (PageID    : Pages;
  164.  X         : Xrange;
  165.  Y         : Yrange;
  166.  Say       : FieldTxt;
  167.  GetInt    : POINTER;
  168.  Len       : MaxFL;
  169.  Min,Max   : INTEGER);
  170.  
  171.  
  172. PROCEDURE AddASGLIR    { Add an AtSayGetLongIntRange procedure }
  173. (PageID    : Pages;
  174.  X         : Xrange;
  175.  Y         : Yrange;
  176.  Say       : FieldTxt;
  177.  GetLongInt: POINTER;
  178.  Len       : MaxFL;
  179.  Min,Max   : LongInt);
  180.  
  181.  
  182. PROCEDURE AddASGWR     { Add an AtSayGetWordRange procedure }
  183. (PageID    : Pages;
  184.  X         : Xrange;
  185.  Y         : Yrange;
  186.  Say       : FieldTxt;
  187.  GetWord   : POINTER;
  188.  Len       : MaxFL;
  189.  Min,Max   : WORD);
  190.  
  191.  
  192.  
  193. {Procedure to activate FULL SCREEN EDITING:
  194.  
  195. After "Making" your entry page(s) and "Adding" a full list of ASG procedures
  196. to each, you can call the following procedure to manage each edit page. Once
  197. built, you can call ReadPage(#) to edit any number of records or sets of
  198. variables. To see how simple it is to use these procedures see ReadDemo.PAS
  199. }
  200.  
  201.  
  202. PROCEDURE ReadPage(PageID : Pages);
  203.  
  204.          ----------------end-of-author's-documentation---------------
  205.  
  206.                         Software Library Information:
  207.  
  208.                    This disk copy provided as a service of
  209.  
  210.                         The Public (Software) Library
  211.  
  212.          We are not the authors of this program, nor are we associated
  213.          with the author in any way other than as a distributor of the
  214.          program in accordance with the author's terms of distribution.
  215.  
  216.          Please direct shareware payments and specific questions about
  217.          this program to the author of the program, whose name appears
  218.          elsewhere in  this documentation. If you have trouble getting
  219.          in touch with the author,  we will do whatever we can to help
  220.          you with your questions. All programs have been tested and do
  221.          run.  To report problems,  please use the form that is in the
  222.          file PROBLEM.DOC on many of our disks or in other written for-
  223.          mat with screen printouts, if possible.  The P(s)L cannot de-
  224.          bug programs over the telephone.
  225.  
  226.          Disks in the P(s)L are updated monthly, so if you did not get
  227.          this disk  directly from the P(s)L,  you should be aware that
  228.          the files in this set may no  longer be the current versions.
  229.  
  230.          For a copy of the latest monthly software library newsletter
  231.          and a list of the 1,800+ disks in the library, call or write
  232.  
  233.                         The Public (Software) Library
  234.                               P.O.Box 35705 - F
  235.                            Houston, TX 77235-5705
  236.                                (713) 665-7017
  237.  
  238.  
  239.          ----------------end-of-author's-documentation---------------
  240.  
  241.                         Software Library Information:
  242.  
  243.                    This disk copy provided as a service of
  244.  
  245.                         The Public (Software) Library
  246.  
  247.          We are not the authors of this program, nor are we associated
  248.          with the author in any way other than as a distributor of the
  249.          program in accordance with the author's terms of distribution.
  250.  
  251.          Please direct shareware payments and specific questions about
  252.          this program to the author of the program, whose name appears
  253.          elsewhere in  this documentation. If you have trouble getting
  254.          in touch with the author,  we will do whatever we can to help
  255.          you with your questions. All programs have been tested and do
  256.          run.  To report problems,  please use the form that is in the
  257.          file PROBLEM.DOC on many of our disks or in other written for-
  258.          mat with screen printouts, if possible.  The P(s)L cannot de-
  259.          bug programs over the telephone.
  260.  
  261.          Disks in the P(s)L are updated monthly, so if you did not get
  262.          this disk  directly from the P(s)L,  you should be aware that
  263.          the files in this set may no  longer be the current versions.
  264.  
  265.          For a copy of the latest monthly software library newsletter
  266.          and a list of the 1,800+ disks in the library, call or write
  267.  
  268.                         The Public (Software) Library
  269.                               P.O.Box 35705 - F
  270.                            Houston, TX 77235-5705
  271.                                (713) 665-7017
  272.  
  273.